//
//  TermServiceViewController.m
//  HYApp
//
//  Created by Jianbo Cai on 2020/8/21.
//  Copyright © 2020 Unidax. All rights reserved.
//

#import "TermServiceViewController.h"

@interface TermServiceViewController ()

@end

@implementation TermServiceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = self.dict[@"name"];
    NSString * dateTitle = JFMainLocalizedString(@"myProfile.SignedDate");
    NSString * signed_date = self.dict[@"signed_date"];
    NSString * date = [[signed_date componentsSeparatedByString:@" "] firstObject];
    self.titleLable.text = [NSString stringWithFormat:@"%@%@",dateTitle,date];
    
    NSString * document = self.dict[@"document"];
    if ([JFStringHelper isNotEmpty:document]) {
        NSAttributedString *attributedString = [[NSAttributedString alloc] initWithData:[document dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
        self.textView.attributedText = attributedString;
    }
}
-(void)setDict:(NSDictionary *)dict{
    _dict = dict;
}

@end
